<?php

include "connect.php";
$subject_id=$_POST['subject_id'];
$sub_name=$_POST['sub_name'];
$dept_id=$_POST['dept_id'];
$campus_id=$_POST['campus_id'];


$sq=mysql_query("select * From subject where subject_id='$subject_id'");
while ($row= mysql_fetch_array($sq)) {
$sql=mysql_query("UPDATE subject SET subject_id='$subject_id',sub_name='$sub_name',dept_id='$dept_id',campus_id='$campus_id'
  where subject_id='$subject_id'");


header("location:update_subject_success.php");
}
?>
